/*
 * Academic License - for use in teaching, academic research, and meeting
 * course requirements at degree granting institutions only.  Not for
 * government, commercial, or other organizational use.
 *
 * File: smo_cal.c
 *
 * Code generated for Simulink model 'smo_cal'.
 *
 * Model version                  : 1.5
 * Simulink Coder version         : 9.8 (R2022b) 13-May-2022
 * C/C++ source code generated on : Sat Sep 14 17:42:55 2024
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: ARM Compatible->ARM Cortex-M
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#include "smo_cal.h"
#include "rtwtypes.h"
#include <math.h>
#include <float.h>
#include <stddef.h>
#define NumBitsPerChar                 8U

/* Exported block parameters */
real32_T SMO_Kslide = 0.65F;           /* Variable: SMO_Kslide
                                        * Referenced by:
                                        *   '<S3>/Constant'
                                        *   '<S4>/Constant'
                                        *   '<S5>/Constant'
                                        *   '<S6>/Constant'
                                        *   '<S7>/Constant'
                                        *   '<S8>/Constant'
                                        */
real32_T SMO_MaxSMCError = 1.2F;       /* Variable: SMO_MaxSMCError
                                        * Referenced by:
                                        *   '<S3>/Constant1'
                                        *   '<S6>/Constant1'
                                        */
real32_T SMO_OffsetAngle = 0.185398185F;/* Variable: SMO_OffsetAngle
                                         * Referenced by: '<S13>/Constant1'
                                         */

/* Block signals (default storage) */
B_smo_cal_T smo_cal_B;

/* Block states (default storage) */
DW_smo_cal_T smo_cal_DW;

/* Real-time model */
static RT_MODEL_smo_cal_T smo_cal_M_;
RT_MODEL_smo_cal_T *const smo_cal_M = &smo_cal_M_;
extern real32_T rt_atan2f_snf(real32_T u0, real32_T u1);
extern real32_T rt_modf_snf(real32_T u0, real32_T u1);
static void smo_cal_IfActionSubsystem(real32_T rtu_ERR, real32_T *rty_Zalpha);
static void smo_cal_IfActionSubsystem1(real32_T *rty_Zalpha);
static void smo_cal_IfActionSubsystem2(real32_T *rty_Zalpha);
static real_T rtGetNaN(void);
static real32_T rtGetNaNF(void);

/*===========*
 * Constants *
 *===========*/
#define RT_PI                          3.14159265358979323846
#define RT_PIF                         3.1415927F
#define RT_LN_10                       2.30258509299404568402
#define RT_LN_10F                      2.3025851F
#define RT_LOG10E                      0.43429448190325182765
#define RT_LOG10EF                     0.43429449F
#define RT_E                           2.7182818284590452354
#define RT_EF                          2.7182817F

/*
 * UNUSED_PARAMETER(x)
 *   Used to specify that a function parameter (argument) is required but not
 *   accessed by the function body.
 */
#ifndef UNUSED_PARAMETER
#if defined(__LCC__)
#define UNUSED_PARAMETER(x)                                      /* do nothing */
#else

/*
 * This is the semi-ANSI standard way of indicating that an
 * unused function parameter is required.
 */
#define UNUSED_PARAMETER(x)            (void) (x)
#endif
#endif

#define NOT_USING_NONFINITE_LITERALS   1

extern real_T rtInf;
extern real_T rtMinusInf;
extern real_T rtNaN;
extern real32_T rtInfF;
extern real32_T rtMinusInfF;
extern real32_T rtNaNF;
static void rt_InitInfAndNaN(size_t realSize);
static boolean_T rtIsInf(real_T value);
static boolean_T rtIsInfF(real32_T value);
static boolean_T rtIsNaN(real_T value);
static boolean_T rtIsNaNF(real32_T value);
typedef struct {
  struct {
    uint32_T wordH;
    uint32_T wordL;
  } words;
} BigEndianIEEEDouble;

typedef struct {
  struct {
    uint32_T wordL;
    uint32_T wordH;
  } words;
} LittleEndianIEEEDouble;

typedef struct {
  union {
    real32_T wordLreal;
    uint32_T wordLuint;
  } wordL;
} IEEESingle;

real_T rtInf;
real_T rtMinusInf;
real_T rtNaN;
real32_T rtInfF;
real32_T rtMinusInfF;
real32_T rtNaNF;
static real_T rtGetInf(void);
static real32_T rtGetInfF(void);
static real_T rtGetMinusInf(void);
static real32_T rtGetMinusInfF(void);

/*
 * Initialize rtNaN needed by the generated code.
 * NaN is initialized as non-signaling. Assumes IEEE.
 */
static real_T rtGetNaN(void)
{
  size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
  real_T nan = 0.0;
  if (bitsPerReal == 32U) {
    nan = rtGetNaNF();
  } else {
    union {
      LittleEndianIEEEDouble bitVal;
      real_T fltVal;
    } tmpVal;

    tmpVal.bitVal.words.wordH = 0xFFF80000U;
    tmpVal.bitVal.words.wordL = 0x00000000U;
    nan = tmpVal.fltVal;
  }

  return nan;
}

/*
 * Initialize rtNaNF needed by the generated code.
 * NaN is initialized as non-signaling. Assumes IEEE.
 */
static real32_T rtGetNaNF(void)
{
  IEEESingle nanF = { { 0.0F } };

  nanF.wordL.wordLuint = 0xFFC00000U;
  return nanF.wordL.wordLreal;
}

/*
 * Initialize the rtInf, rtMinusInf, and rtNaN needed by the
 * generated code. NaN is initialized as non-signaling. Assumes IEEE.
 */
static void rt_InitInfAndNaN(size_t realSize)
{
  (void) (realSize);
  rtNaN = rtGetNaN();
  rtNaNF = rtGetNaNF();
  rtInf = rtGetInf();
  rtInfF = rtGetInfF();
  rtMinusInf = rtGetMinusInf();
  rtMinusInfF = rtGetMinusInfF();
}

/* Test if value is infinite */
static boolean_T rtIsInf(real_T value)
{
  return (boolean_T)((value==rtInf || value==rtMinusInf) ? 1U : 0U);
}

/* Test if single-precision value is infinite */
static boolean_T rtIsInfF(real32_T value)
{
  return (boolean_T)(((value)==rtInfF || (value)==rtMinusInfF) ? 1U : 0U);
}

/* Test if value is not a number */
static boolean_T rtIsNaN(real_T value)
{
  boolean_T result = (boolean_T) 0;
  size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
  if (bitsPerReal == 32U) {
    result = rtIsNaNF((real32_T)value);
  } else {
    union {
      LittleEndianIEEEDouble bitVal;
      real_T fltVal;
    } tmpVal;

    tmpVal.fltVal = value;
    result = (boolean_T)((tmpVal.bitVal.words.wordH & 0x7FF00000) == 0x7FF00000 &&
                         ( (tmpVal.bitVal.words.wordH & 0x000FFFFF) != 0 ||
                          (tmpVal.bitVal.words.wordL != 0) ));
  }

  return result;
}

/* Test if single-precision value is not a number */
static boolean_T rtIsNaNF(real32_T value)
{
  IEEESingle tmp;
  tmp.wordL.wordLreal = value;
  return (boolean_T)( (tmp.wordL.wordLuint & 0x7F800000) == 0x7F800000 &&
                     (tmp.wordL.wordLuint & 0x007FFFFF) != 0 );
}

/*
 * Initialize rtInf needed by the generated code.
 * Inf is initialized as non-signaling. Assumes IEEE.
 */
static real_T rtGetInf(void)
{
  size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
  real_T inf = 0.0;
  if (bitsPerReal == 32U) {
    inf = rtGetInfF();
  } else {
    union {
      LittleEndianIEEEDouble bitVal;
      real_T fltVal;
    } tmpVal;

    tmpVal.bitVal.words.wordH = 0x7FF00000U;
    tmpVal.bitVal.words.wordL = 0x00000000U;
    inf = tmpVal.fltVal;
  }

  return inf;
}

/*
 * Initialize rtInfF needed by the generated code.
 * Inf is initialized as non-signaling. Assumes IEEE.
 */
static real32_T rtGetInfF(void)
{
  IEEESingle infF;
  infF.wordL.wordLuint = 0x7F800000U;
  return infF.wordL.wordLreal;
}

/*
 * Initialize rtMinusInf needed by the generated code.
 * Inf is initialized as non-signaling. Assumes IEEE.
 */
static real_T rtGetMinusInf(void)
{
  size_t bitsPerReal = sizeof(real_T) * (NumBitsPerChar);
  real_T minf = 0.0;
  if (bitsPerReal == 32U) {
    minf = rtGetMinusInfF();
  } else {
    union {
      LittleEndianIEEEDouble bitVal;
      real_T fltVal;
    } tmpVal;

    tmpVal.bitVal.words.wordH = 0xFFF00000U;
    tmpVal.bitVal.words.wordL = 0x00000000U;
    minf = tmpVal.fltVal;
  }

  return minf;
}

/*
 * Initialize rtMinusInfF needed by the generated code.
 * Inf is initialized as non-signaling. Assumes IEEE.
 */
static real32_T rtGetMinusInfF(void)
{
  IEEESingle minfF;
  minfF.wordL.wordLuint = 0xFF800000U;
  return minfF.wordL.wordLreal;
}

/*
 * Output and update for action system:
 *    '<S1>/If Action Subsystem'
 *    '<S1>/If Action Subsystem3'
 */
static void smo_cal_IfActionSubsystem(real32_T rtu_ERR, real32_T *rty_Zalpha)
{
  /* Product: '<S3>/Divide' incorporates:
   *  Constant: '<S3>/Constant'
   *  Constant: '<S3>/Constant1'
   *  Product: '<S3>/Product'
   */
  *rty_Zalpha = rtu_ERR * SMO_Kslide / SMO_MaxSMCError;
}

/*
 * Output and update for action system:
 *    '<S1>/If Action Subsystem1'
 *    '<S1>/If Action Subsystem4'
 */
static void smo_cal_IfActionSubsystem1(real32_T *rty_Zalpha)
{
  /* SignalConversion generated from: '<S4>/Zalpha' incorporates:
   *  Constant: '<S4>/Constant'
   */
  *rty_Zalpha = SMO_Kslide;
}

/*
 * Output and update for action system:
 *    '<S1>/If Action Subsystem2'
 *    '<S1>/If Action Subsystem5'
 */
static void smo_cal_IfActionSubsystem2(real32_T *rty_Zalpha)
{
  /* Gain: '<S5>/Gain' incorporates:
   *  Constant: '<S5>/Constant'
   */
  *rty_Zalpha = -SMO_Kslide;
}

real32_T rt_atan2f_snf(real32_T u0, real32_T u1)
{
  real32_T y;
  if (rtIsNaNF(u0) || rtIsNaNF(u1)) {
    y = (rtNaNF);
  } else if (rtIsInfF(u0) && rtIsInfF(u1)) {
    int32_T tmp;
    int32_T tmp_0;
    if (u0 > 0.0F) {
      tmp = 1;
    } else {
      tmp = -1;
    }

    if (u1 > 0.0F) {
      tmp_0 = 1;
    } else {
      tmp_0 = -1;
    }

    y = atan2f((real32_T)tmp, (real32_T)tmp_0);
  } else if (u1 == 0.0F) {
    if (u0 > 0.0F) {
      y = RT_PIF / 2.0F;
    } else if (u0 < 0.0F) {
      y = -(RT_PIF / 2.0F);
    } else {
      y = 0.0F;
    }
  } else {
    y = atan2f(u0, u1);
  }

  return y;
}

real32_T rt_modf_snf(real32_T u0, real32_T u1)
{
  real32_T y;
  y = u0;
  if (u1 == 0.0F) {
    if (u0 == 0.0F) {
      y = u1;
    }
  } else if (rtIsNaNF(u0) || rtIsNaNF(u1) || rtIsInfF(u0)) {
    y = (rtNaNF);
  } else if (u0 == 0.0F) {
    y = 0.0F / u1;
  } else if (rtIsInfF(u1)) {
    if ((u1 < 0.0F) != (u0 < 0.0F)) {
      y = u1;
    }
  } else {
    boolean_T yEq;
    y = fmodf(u0, u1);
    yEq = (y == 0.0F);
    if ((!yEq) && (u1 > floorf(u1))) {
      real32_T q;
      q = fabsf(u0 / u1);
      yEq = !(fabsf(q - floorf(q + 0.5F)) > FLT_EPSILON * q);
    }

    if (yEq) {
      y = u1 * 0.0F;
    } else if ((u0 < 0.0F) != (u1 < 0.0F)) {
      y += u1;
    }
  }

  return y;
}

/* Model step function */
void smo_cal_step(real32_T arg_Valpha, real32_T arg_Vbata, real32_T arg_Ialpha,
                  real32_T arg_Ibeta, real32_T *arg_SMO_Theta, real32_T
                  *arg_SMO_Speed)
{
  real32_T rtb_ERR;
  real32_T rtb_ERR_f;
  real32_T rtb_Merge;
  uint32_T rtb_PositionToCount;

  /* Saturate: '<Root>/Saturation' incorporates:
   *  Delay: '<Root>/Delay'
   */
  if (smo_cal_DW.Delay_DSTATE_h > 5000.0F) {
    /* DiscreteIntegrator: '<S1>/Discrete-Time Integrator1' */
    smo_cal_DW.Delay_DSTATE_h = 5000.0F;
  } else if (smo_cal_DW.Delay_DSTATE_h < 10.0F) {
    /* DiscreteIntegrator: '<S1>/Discrete-Time Integrator1' */
    smo_cal_DW.Delay_DSTATE_h = 10.0F;
  }

  /* End of Saturate: '<Root>/Saturation' */

  /* Sum: '<S1>/Sum' incorporates:
   *  DiscreteIntegrator: '<S1>/Discrete-Time Integrator'
   *  Inport: '<Root>/Ialpha'
   */
  rtb_ERR = smo_cal_DW.DiscreteTimeIntegrator_DSTATE - arg_Ialpha;

  /* If: '<S1>/If' */
  if (rtb_ERR < 1.5F) {
    /* Outputs for IfAction SubSystem: '<S1>/If Action Subsystem' incorporates:
     *  ActionPort: '<S3>/Action Port'
     */
    smo_cal_IfActionSubsystem(rtb_ERR, &rtb_Merge);

    /* End of Outputs for SubSystem: '<S1>/If Action Subsystem' */
  } else if (rtb_ERR > 0.0F) {
    /* Outputs for IfAction SubSystem: '<S1>/If Action Subsystem1' incorporates:
     *  ActionPort: '<S4>/Action Port'
     */
    smo_cal_IfActionSubsystem1(&rtb_Merge);

    /* End of Outputs for SubSystem: '<S1>/If Action Subsystem1' */
  } else {
    /* Outputs for IfAction SubSystem: '<S1>/If Action Subsystem2' incorporates:
     *  ActionPort: '<S5>/Action Port'
     */
    smo_cal_IfActionSubsystem2(&rtb_Merge);

    /* End of Outputs for SubSystem: '<S1>/If Action Subsystem2' */
  }

  /* End of If: '<S1>/If' */

  /* Sum: '<S9>/Add' incorporates:
   *  Delay: '<S9>/Delay'
   *  Gain: '<S9>/Gain'
   *  Product: '<S9>/Product'
   *  Sum: '<S9>/Add1'
   */
  smo_cal_DW.Delay_DSTATE += 5.0E-5F * smo_cal_DW.Delay_DSTATE_h * (rtb_Merge -
    smo_cal_DW.Delay_DSTATE);

  /* Sum: '<S1>/Sum1' incorporates:
   *  DiscreteIntegrator: '<S1>/Discrete-Time Integrator1'
   *  Inport: '<Root>/Ibeta'
   */
  rtb_ERR_f = smo_cal_DW.DiscreteTimeIntegrator1_DSTATE - arg_Ibeta;

  /* If: '<S1>/If1' */
  if (rtb_ERR_f < 1.5F) {
    /* Outputs for IfAction SubSystem: '<S1>/If Action Subsystem3' incorporates:
     *  ActionPort: '<S6>/Action Port'
     */
    smo_cal_IfActionSubsystem(rtb_ERR_f, &rtb_ERR);

    /* End of Outputs for SubSystem: '<S1>/If Action Subsystem3' */
  } else if (rtb_ERR_f > 0.0F) {
    /* Outputs for IfAction SubSystem: '<S1>/If Action Subsystem4' incorporates:
     *  ActionPort: '<S7>/Action Port'
     */
    smo_cal_IfActionSubsystem1(&rtb_ERR);

    /* End of Outputs for SubSystem: '<S1>/If Action Subsystem4' */
  } else {
    /* Outputs for IfAction SubSystem: '<S1>/If Action Subsystem5' incorporates:
     *  ActionPort: '<S8>/Action Port'
     */
    smo_cal_IfActionSubsystem2(&rtb_ERR);

    /* End of Outputs for SubSystem: '<S1>/If Action Subsystem5' */
  }

  /* End of If: '<S1>/If1' */

  /* Sum: '<S10>/Add' incorporates:
   *  Delay: '<S10>/Delay'
   *  Gain: '<S10>/Gain'
   *  Product: '<S10>/Product'
   *  Sum: '<S10>/Add1'
   */
  smo_cal_DW.Delay_DSTATE_f += 5.0E-5F * smo_cal_DW.Delay_DSTATE_h * (rtb_ERR -
    smo_cal_DW.Delay_DSTATE_f);

  /* Outputs for Atomic SubSystem: '<S2>/atan2' */
  /* Outputs for Enabled SubSystem: '<S15>/If Action Subsystem' incorporates:
   *  EnablePort: '<S30>/Enable'
   */
  /* Merge: '<S15>/Merge' incorporates:
   *  Delay: '<S10>/Delay'
   *  Delay: '<S9>/Delay'
   *  SignalConversion generated from: '<S30>/In1'
   *  Trigonometry: '<S15>/Atan2'
   */
  smo_cal_B.Merge = rt_atan2f_snf(smo_cal_DW.Delay_DSTATE,
    smo_cal_DW.Delay_DSTATE_f);

  /* End of Outputs for SubSystem: '<S15>/If Action Subsystem' */

  /* Sum: '<S13>/Add' incorporates:
   *  AlgorithmDescriptorDelegate generated from: '<S15>/a16'
   *  Constant: '<S13>/Constant1'
   *  Constant: '<S2>/Constant'
   *  Gain: '<S2>/Gain'
   *  Math: '<S2>/Math Function'
   */
  *arg_SMO_Theta = rt_modf_snf(-smo_cal_B.Merge, 6.28318548F) + SMO_OffsetAngle;

  /* End of Outputs for SubSystem: '<S2>/atan2' */

  /* If: '<S22>/If' */
  if (*arg_SMO_Theta > 6.2832F) {
    /* Outputs for IfAction SubSystem: '<S22>/If Action Subsystem' incorporates:
     *  ActionPort: '<S23>/Action Port'
     */
    /* Sum: '<S13>/Add' incorporates:
     *  Constant: '<S23>/Constant'
     *  Sum: '<S23>/Add'
     */
    *arg_SMO_Theta -= 6.28318548F;

    /* End of Outputs for SubSystem: '<S22>/If Action Subsystem' */
  } else if (*arg_SMO_Theta < 0.0F) {
    /* Outputs for IfAction SubSystem: '<S22>/If Action Subsystem1' incorporates:
     *  ActionPort: '<S24>/Action Port'
     */
    /* Sum: '<S13>/Add' incorporates:
     *  Constant: '<S24>/Constant'
     *  Sum: '<S24>/Add'
     */
    *arg_SMO_Theta += 6.28318548F;

    /* End of Outputs for SubSystem: '<S22>/If Action Subsystem1' */
  }

  /* End of If: '<S22>/If' */

  /* Gain: '<S14>/PositionToCount' */
  rtb_ERR_f = truncf(6.83563648E+8F * *arg_SMO_Theta);
  if (rtIsNaNF(rtb_ERR_f) || rtIsInfF(rtb_ERR_f)) {
    rtb_ERR_f = 0.0F;
  } else {
    rtb_ERR_f = fmodf(rtb_ERR_f, 4.2949673E+9F);
  }

  rtb_PositionToCount = rtb_ERR_f < 0.0F ? (uint32_T)-(int32_T)(uint32_T)
    -rtb_ERR_f : (uint32_T)rtb_ERR_f;

  /* End of Gain: '<S14>/PositionToCount' */

  /* Sum: '<S18>/Add1' incorporates:
   *  Constant: '<S18>/Filter_Constant'
   *  Constant: '<S18>/One'
   *  DataTypeConversion: '<S27>/DTC'
   *  Delay: '<S14>/Delay'
   *  Gain: '<S14>/SpeedGain'
   *  Gain: '<S2>/Gain1'
   *  Product: '<S18>/Product'
   *  Product: '<S18>/Product1'
   *  Sum: '<S14>/SpeedCount'
   *  UnitDelay: '<S18>/Unit Delay'
   */
  smo_cal_DW.UnitDelay_DSTATE = (real32_T)((int32_T)rtb_PositionToCount -
    (int32_T)smo_cal_DW.Delay_DSTATE_g[smo_cal_DW.CircBufIdx]) * 5.58793545E-5F *
    0.142857149F * 0.02F + 0.98F * smo_cal_DW.UnitDelay_DSTATE;

  /* Outport: '<Root>/SMO_Speed' incorporates:
   *  UnitDelay: '<S18>/Unit Delay'
   */
  *arg_SMO_Speed = smo_cal_DW.UnitDelay_DSTATE;

  /* DiscreteIntegrator: '<S1>/Discrete-Time Integrator1' incorporates:
   *  Constant: '<S21>/Filter_Constant'
   *  Constant: '<S21>/One'
   *  Gain: '<S2>/f_2_we'
   *  Gain: '<S2>/n_2_f'
   *  Product: '<S21>/Product'
   *  Product: '<S21>/Product1'
   *  Sum: '<S21>/Add1'
   *  UnitDelay: '<S18>/Unit Delay'
   *  UnitDelay: '<S21>/Unit Delay'
   */
  smo_cal_DW.Delay_DSTATE_h = 0.116666667F * smo_cal_DW.UnitDelay_DSTATE *
    6.28318548F * 0.02F + 0.98F * smo_cal_DW.UnitDelay_DSTATE_b;

  /* Update for DiscreteIntegrator: '<S1>/Discrete-Time Integrator' incorporates:
   *  Delay: '<S9>/Delay'
   *  Gain: '<S1>/Gain'
   *  Gain: '<S1>/Gain1'
   *  Inport: '<Root>/Valpha'
   *  Sum: '<S1>/Add'
   *  Sum: '<S1>/Add1'
   */
  smo_cal_DW.DiscreteTimeIntegrator_DSTATE += (((arg_Valpha -
    smo_cal_DW.Delay_DSTATE) - rtb_Merge) * 10309.2783F + -2000.0F *
    smo_cal_DW.DiscreteTimeIntegrator_DSTATE) * 5.0E-5F;

  /* Update for DiscreteIntegrator: '<S1>/Discrete-Time Integrator1' incorporates:
   *  Delay: '<S10>/Delay'
   *  Gain: '<S1>/Gain2'
   *  Gain: '<S1>/Gain3'
   *  Inport: '<Root>/Vbata'
   *  Sum: '<S1>/Add2'
   *  Sum: '<S1>/Add3'
   */
  smo_cal_DW.DiscreteTimeIntegrator1_DSTATE += (((arg_Vbata -
    smo_cal_DW.Delay_DSTATE_f) - rtb_ERR) * 10309.2783F + -2000.0F *
    smo_cal_DW.DiscreteTimeIntegrator1_DSTATE) * 5.0E-5F;

  /* Update for Delay: '<S14>/Delay' */
  smo_cal_DW.Delay_DSTATE_g[smo_cal_DW.CircBufIdx] = rtb_PositionToCount;
  if (smo_cal_DW.CircBufIdx < 4U) {
    smo_cal_DW.CircBufIdx++;
  } else {
    smo_cal_DW.CircBufIdx = 0U;
  }

  /* End of Update for Delay: '<S14>/Delay' */

  /* Update for UnitDelay: '<S21>/Unit Delay' incorporates:
   *  Delay: '<Root>/Delay'
   */
  smo_cal_DW.UnitDelay_DSTATE_b = smo_cal_DW.Delay_DSTATE_h;
}

/* Model initialize function */
void smo_cal_initialize(void)
{
  /* Registration code */

  /* initialize non-finites */
  rt_InitInfAndNaN(sizeof(real_T));
}

/* Model terminate function */
void smo_cal_terminate(void)
{
  /* (no terminate code required) */
}

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
